package org.graduation.model.common.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("user")
public class User implements Serializable {
    private static final long serialVersionUID = 19219827139L;
    @TableId(value = "uid", type = IdType.AUTO)
    private Integer uid;
    @TableField(value = "email")
    private String email;
    @TableField(value = "password")
    private String password;
    @TableField(value = "nickname")
    private String nickname;

    /**
     * 脱敏，修改密码为空字符串
     */
    public void hiddenPassword() {
        this.password = "";
    }
}
